﻿{include file="public/header" /}
{css href="__ROOT__/static/public/umeditor/themes/default/css/umeditor.css" /}
{js href="__ROOT__/static/public/umeditor/third-party/template.min.js" /}
{js href="__ROOT__/static/public/umeditor/umeditor.config.js" /}
{js href="__ROOT__/static/public/umeditor/umeditor.min.js" /}
	<form method="post" class="form-x" action="{if $data.id}?id={$data.id}{/if}">
	<div class="panel admin-panel">
		<div class="panel-head"><strong>{:lang('currency')['edit']}</strong></div>
		<br/>
		<div class="form-group">
			<div class="label">
				<label for="seller">{:lang('label')['seller']}</label>
			</div>
			<div class="field">
				<select id="uid" name="uid" class="input input-auto" data-validate="required:{:lang('currency')['required']}">
					{volist name="seller" id="seller"}
						<option {if $seller.id == $data.uid} selected {/if} value="{$seller.id}">{$seller.name}</option>
					{/volist}
				</select>
			</div>
		</div>
		<script>
		//city 参数和回调
		var gid="{$data.gid}";
		var cateid="{$data.cateid}";
		var selectc=true;
		function select_g(){
			return false;
		}
		function select_c(){
			return false;
		}
		</script>
		<div class="form-group">
			<div class="label">
				<label for="title">{:lang('label')['category']}</label>
			</div>
			<div class="field">
				{include file="public/category" /}
			</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label for="title">{:lang('label')['title']}</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="title" name="title" value="{$data.title}" size="80" placeholder="{:lang('label')['title']}" data-validate="required:{:lang('currency')['required']}" />
			</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label for="price">{:lang('label')['price']}</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="price" name="price" value="{$data.price}" size="80" placeholder="{:lang('label')['price']}" data-validate="required:{:lang('currency')['required']}" />
			</div>
		</div>
		<div class="form-group">
		<div class="input-inline clearfix">
			<div class="label">
				<label for="image1">{:lang('label')['image']}1</label>
			</div>
			<div class="field">
				<input type="text" readonly class="input input-auto" id="image1" name="image1" value="{$data.image1}" size="65" placeholder="{:lang('label')['image']}" data-validate="required:{:lang('currency')['required']}" />
				<span class="addbtn"><button type="button" data-id="image1" class="button upload">{:lang('form')['file']}</button></span>
			</div>
		</div>
		</div>
		<div class="form-group">
		<div class="input-inline clearfix">
			<div class="label">
				<label for="image2">{:lang('label')['image']}2</label>
			</div>
			<div class="field">
				<input type="text" readonly class="input input-auto" id="image2" name="image2" value="{$data.image2}" size="65" placeholder="{:lang('label')['image']}" />
				<span class="addbtn"><button type="button" data-id="image2" class="button upload">{:lang('form')['file']}</button></span>
			</div>
		</div>
		</div>
		<div class="form-group">
		<div class="input-inline clearfix">
			<div class="label">
				<label for="image3">{:lang('label')['image']}3</label>
			</div>
			<div class="field">
				<input type="text" readonly class="input input-auto" id="image3" name="image3" value="{$data.image3}" size="65" placeholder="{:lang('label')['image']}" />
				<span class="addbtn"><button type="button" data-id="image3" class="button upload">{:lang('form')['file']}</button></span>
			</div>
		</div>
		</div>
		<div class="form-group">
		<div class="input-inline clearfix">
			<div class="label">
				<label for="image4">{:lang('label')['image']}4</label>
			</div>
			<div class="field">
				<input type="text" readonly class="input input-auto" id="image4" name="image4" value="{$data.image4}" size="65" placeholder="{:lang('label')['image']}" />
				<span class="addbtn"><button type="button" data-id="image4" class="button upload">{:lang('form')['file']}</button></span>
			</div>
		</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label>{:lang('label')['status']}</label>
			</div>
			<div class="field">
				<div class="button-group button-group-small radio">
					<label class="button {if $data.status == "1" || !$data.status}active{/if}">
						<input name="status" value="1" {if $data.status == "1" || !$data.status}checked="checked"{/if} type="radio"><span class="icon icon-check"></span> {:lang('currency')['status_1']}</label>
					<label class="button {if $data.status == "2"}active{/if}">
						<input name="status" value="2" {if $data.status == "2"}checked="checked"{/if} type="radio"><span class="icon icon-times"></span> {:lang('currency')['status_2']}</label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label for="service">{:lang('label')['service']}</label>
			</div>
			<div class="field">
				<script data-validate="required:{:lang('currency')['required']}" type="text/plain" name="service" id="myEditor" style="width:1000px;height:240px;">{$data.service} </script>
			</div>
		</div>
		<div class="form-group">
			<div class="label">
				<label for="content">{:lang('label')['content']}</label>
			</div>
			<div class="field">
				<script data-validate="required:{:lang('currency')['required']}" type="text/plain" name="content" id="myEditor2" style="width:1000px;height:240px;">{$data.content} </script>
			</div>
		</div>
		<div id="refuse" class="form-group{if $data.status != '2'} hidden {/if}">
			<div class="label">
				<label for="refuse">{:lang('label')['refuse']}</label>
			</div>
			<div class="field">
				<textarea name="refuse" class="input input-auto" rows="5" cols="80" placeholder="{:lang('label')['refuse']}" data-validate="required:{:lang('currency')['required']}">{$data.refuse}</textarea>
			</div>
		</div>
		<div class="form-button">
			<button class="button bg-main" type="submit">{:lang('form')['submit']}</button>
		</div>
		<br/>
		</div>
	</form>
		<script>
		$("[name='status']").click(function(){
			var status = $("[name='status']:checked").val();
			if(status=='1'){
				$("#refuse").addClass('hidden');
			}else{
				$("#refuse").removeClass('hidden');
			}
		});
		var um = UM.getEditor('myEditor');
		var um = UM.getEditor('myEditor1');
		var um = UM.getEditor('myEditor2');
	</script>
{include file="public/footer" /}